package com.liuyang.web;

import com.liuyang.service.UserService;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class UserController {
    public static void main(String[] args) {
        //引用xml配置文件
        ApplicationContext app = new ClassPathXmlApplicationContext("applicationContext.xml");
        //
        UserService userService = app.getBean(UserService.class);
        //调用方法
        userService.save();

    }
}
